<{$searchInfo}>
<{if $tabs}>
<ul class="GoodsSearchTabs">
  <li<{if $args.3 eq ''}> class="current"<{/if}>><a href="<{link args=$args arg3=''}>"><span><{t}>All goods<{/t}></span></a>
  </li>
  <{section name=tabs loop=$tabs}> <li<{if is_numeric($args.3) && $args.3 eq $smarty.section.tabs.index}> class="current"<{/if}>><a href="<{link args=$args arg3=$smarty.section.tabs.index}>"><span><{$tabs[tabs].label}></span></a>
  </li>
  <{/section}>
  <li></li>
</ul>
<{/if}>
<div class="clear"></div>
<div class="GoodsSearchWrap"> 

      <form method="post" action="<{link ctl=search act=result}>" id='selector-form'>
        <input type="hidden" name="filter" value="<{$args[1]}>" />
        <{if $cat_id}>
        <input type="hidden" name="cat_id" value="<{$cat_id}>">
        <{/if}>
        
        <div class="GoodsSelector division boxGray">
        <{require file="gallery/selector/default.html"}>
        </div>
        
        <{if count($searchInput)>0}>
            <div class="GoodsSelector division boxGray">
                <div class="division clearfix"> <{foreach from=$searchInput item=prop key=key}>
                  <div class="span-3">
                    <h5><{$prop.name}></h5>
                    <{input type=$prop.type name="p_{$key}[]" value=$prop.value options=$prop.options id="sel-prop-$key" style="width:100px"}> </div>
                  <{/foreach}> </div>
                <div class="textcenter">
                  <input type="submit" type="submit" value="Display of goods to meet the requirements" />
                </div>
             </div>
        <{/if}>
      </form>
      <script type='text/javascript'>
      var fixEmpeyPanel = (function(el){
         el.setStyle('display',el.get('text').clean().trim()?'block':'none');
         return arguments.callee; 
      })($('selector-form'));
         
         if($('selector-form').style.display!='none'){
            $$('#selector-form .division').each(fixEmpeyPanel);
         }
      </script>
      
<{if $searchtotal}>
<div class="search_total"><{t}>Total found<{/t}><font color='red'><{$searchtotal}></font><{t}>Products<{/t}></div>
<{/if}>

  <div class="title" id='gallerybar'>
  <table width="100%" cellpadding=0 cellspacing=0>
    <tbody>
     <tr>
        <td>
             <{pager data=$pager type=mini}>
         </td>
         <{if count($views)>1}>
         <td>
              <div class="listmode">
                 <{foreach from=$views key=label item=view}>
                  <{if $curView==$view}>
                  <span class="list_<{$view}> current"><{$label}></span> <{else}>
                  <a href="<{link act=$view args=$args}>" title="<{$label}>"><span class="list_<{$view}>"><{$label}></span></a> <{/if}>
                  <{/foreach}> 
              </div>
         </td>
         <{/if}>
         <td>
             <div class="listorder">
              <{if $args.2 == 3}>
                <a class="list_desc_on" href="<{link args=$args arg2=4}>"><i><{t}>Price<{/t}></i></a>
                <a class="list_desc" href="<{link args=$args arg2=8}>"><i><{t}>Sales<{/t}></i></a>
                <a class="list_desc" href="<{link args=$args arg2=6}>"><i><{t}>Popularity<{/t}></i></a>
              <{elseif $args.2 == 4}>
                <a class="list_asc_on" href="<{link args=$args arg2=3}>"><i><{t}>Price<{/t}></i></a>
                <a class="list_desc" href="<{link args=$args arg2=8}>"><i><{t}>Sales<{/t}></i></a>
                <a class="list_desc" href="<{link args=$args arg2=6}>"><i><{t}>Popularity<{/t}></i></a>
              <{elseif $args.2 == 6}>
                <a class="list_desc" href="<{link args=$args arg2=3}>"><i><{t}>Price<{/t}></i></a>
                <a class="list_desc" href="<{link args=$args arg2=8}>"><i><{t}>Sales<{/t}></i></a>
                <span class="list_desc_on"><i><{t}>Popularity<{/t}></i></span> <{elseif $args.2 == 8}>
                <a class="list_desc" href="<{link args=$args arg2=3}>"><i><{t}>Price<{/t}></i></a>
                <span class="list_desc_on"><i><{t}>Sales<{/t}></i></span>
                <a class="list_desc" href="<{link args=$args arg2=6}>"><i><{t}>Popularity<{/t}></i></a>
              <{else}>
                <a class="list_asc" href="<{link args=$args arg2=4}>"><i><{t}>Price<{/t}></i></a>
                <a class="list_desc" href="<{link args=$args arg2=8}>"><i><{t}>Sales<{/t}></i></a>
                <a class="list_desc" href="<{link args=$args arg2=6}>"><i><{t}>Popularity<{/t}></i></a>
              <{/if}> 
             </div>
         </td>
         <td>
           <div class='filtmode'>
            <label><{t}>Sort by:<{/t}></label>
              <select onchange="if(this.value!='_')window.location=this.value">
                <optgroup label="Sort"> <{foreach from=$orderBy item=item key=order}> <option value="<{link args=$args arg2=$order}>"<{if $order eq $args.2}> class="selected" selected="selected"<{/if}>><{$item.label}>
                </option>
                <{/foreach}> </optgroup>
                <{*
                <optgroup label="Show"> <{foreach from=$views key=label item=view}> <option value="<{link act=$view  args=$args}>"<{if $curView==$view}> class="selected"<{/if}>><{$label}>
                </option>
                <{/foreach}> </optgroup>*}>
              </select>
             </div>
         </td>  
     <tr>
    </tbody>
  </table>
  </div>
  <{if !count($products)}>
  <{if $emtpy_info}>
  <div class="FeedBackInfo" style="margin:30px">
    <div class="lineheight-free"><{$emtpy_info}></div>
    <{else}>
    <h1 class="error" style=""><{t}>Sorry, no related titles found<{/t}></h1>
    <p style="margin:15px 1em;"><strong><{t}>Recommendation:<{/t}></strong><br />
      <{t}>Appropriate to shorten or change the keywords for your keywords and re-search, such as: the "Sony phones X1" changed to "Sony + X1"<{/t}></p>
    <{/if}> </div>
  <div align='center'><a href="javascript:history.back(1)"><{t}>Back to Previous Page<{/t}></a><a href="./" style="padding-left:20px"><{t}>Back to Home Page<{/t}></a></div>
  <{/if}>
  <{include file=$_PDT_LST_TPL}>
  <{pager data=$pager}> </div>
    
<script>
window.addEvent('domready', function(){
try{
/*关键字高亮*/
(function(replace_str){
    var replace=replace_str.split("+");
    if(replace.length){
      $ES('.entry-title').each(function(r){
        for(i=0;i<replace.length;i++){
          if(replace[i]){
            var reg=new RegExp("("+replace[i].escapeRegExp()+")","gi");
            r.setText(r.get('text').replace(reg,function(){            
              return "{0}"+arguments[1]+"{1}";
            }));
          }
        }
        r.set('html',r.get('text').format("<font color=red>","</font>"));
      });
    }
  })('<{$search_array}>');
}catch(e){}
if(window.ie6)return;
var gallerybar = $('gallerybar');
var gallerybarSize = gallerybar.getSize();
var gallerybarPos  = gallerybar.getPosition();
var fixedStart = gallerybarSize.y+gallerybarPos.y;

var fixGalleryBar = function(){
    if(fixedStart<this.getScrollTop()){
         gallerybar.addClass('fixed').setStyles({'width':gallerybarSize.x});
    }else{
         gallerybar.removeClass('fixed').setStyles({'width':'auto'});
    }
};

window.addEvents({
   'resize':fixGalleryBar,
   'scroll':fixGalleryBar
});
    

});



</script>
<{javascript file='goodscupcake.js'}>
